from django import forms

class MessageBoardForm(forms.Form):
    title = forms.CharField(max_length=100,min_length=2,label='标题')
    content = forms.CharField(widget=forms.Textarea,label='内容')
    email = forms.EmailField(label='邮箱')
    reply = forms.BooleanField(required=False,label='是否回复')

class MyForm(forms.Form):
    email = forms.EmailField(error_messages={"invalid":"请输入正确的邮箱"})
    price = forms.FloatField(error_messages={"invalid":"请输入浮点类型"})
    personal_website = forms.URLField(error_messages={"invalid":"请输入正确格式的个人网站"})